home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / medowl.zip / CHANGES.DOC next >
Text File  |  1994-09-16  |  10KB  |  320 lines

  1. 7/15/94
  2. -------
  3.  
  4. Added ME_INSERTSTRING message
  5. -----------------------------
  6.  
  7. ME_INSERTSTRING
  8.   Inserts a string into the editor at the current position.
  9.  
  10. Parameters
  11.   wParam is ME_OVERSTRIKE_MODE if you want to overstrike the existing
  12.     text at the current position in the buffer. Any other value of 
  13.     wParam will insert the text at the current position in the buffer.
  14.   lParam is a far pointer to the text to insert. The text may have
  15.     embedded tab characters (\t) or newlines (\n).
  16.  
  17. Returns
  18.   TRUE if the text was inserted, FALSE if not.
  19.  
  20. Example
  21.  
  22.   SendMessage(hWndEdit, ME_INSERTSTRING, ME_INSERT_MODE,
  23.               (LONG) (LPSTR) "This is line 1\nAnd this is line 2\n");
  24.  
  25.  
  26. Added WM_PARENTNOTIFY message
  27. -----------------------------
  28. The edit control sends its ancestors the WM_PARENTNOTIFY message.
  29. See the Windows SDK documentation for more information on this
  30. message.
  31.  
  32.  
  33. 7/21/94
  34. -------
  35.  
  36. Added SEARCH_SELECTMATCH option to the Searching options.
  37. If this is true, then the matched text is highlighted and selected.
  38.  
  39.  
  40. Added some Chicago style messages :
  41.  
  42. EM_EXGETSEL
  43.   wParam is 0
  44.   lParam is a far pointer to a CHARRANGE structure
  45.  
  46. EM_GETSELTEXT
  47.   wParam is 0
  48.   lParam is a far pointer to a buffer which the text will be placed into
  49.  
  50. EM_EXSETSEL
  51.   wParam is 0
  52.   lParam is a far pointer to a CHARRANGE structure
  53.  
  54. EM_EXLINEFROMCHAR
  55.   wParam is 0
  56.   lParam is index
  57.  
  58. EM_SETBKGNDCOLOR
  59.   wParam is TRUE to use system color, FALSE for RGB value in lParam
  60.   lParam is the RGB value
  61.   Returns: the old background color
  62.  
  63.  
  64. 8/3/94
  65. ------
  66.  
  67. Changes to ME_TOGGLEWORDWRAP
  68.  
  69. wParam can be
  70.   WORDWRAP_OFF      - turns wordwrap off
  71.   WORDWRAP_ON       - turns wordwrap on
  72.   WORDWRAP_TOGGLE   - toggles wordwrap mode
  73.  
  74.  
  75. Added ME_REMOVEBOOKMARK
  76.  
  77. ME_REMOVEBOOKMARK
  78.  
  79. Removes one or more bookmarks from the editing buffer.
  80.  
  81. wParam is the letter of the bookmark. It can be 'a' through 'z'. If
  82.   wParam is the special value BOOKMARK_REMOVEALL, then all of the
  83.   bookmarks associated with the editing buffer will be removed.
  84. lParam is not used
  85.  
  86. Returns
  87.   TRUE
  88.  
  89.  
  90. 8/8/94
  91. ------
  92. Added WM_SETREDRAW message
  93.  
  94. WM_SETREDRAW
  95.  
  96. Sets the refresh state of the buffer.
  97.  
  98. Parameters
  99.   wParam can be zero or non-zero. If it is zero, then buffer refreshes
  100.     will be disabled. This means that mulitple editing operations can
  101.     be performed without the buffer refreshing the window after each
  102.     operation. If wParam is non-zero, then refreshing will be enabled.
  103.   lParam is not used.
  104.  
  105. Returns
  106.   Nothing
  107.  
  108.  
  109. Giving the Parent a Shot at Messages
  110. ------------------------------------
  111.  
  112. Before the editor control processes the following messages :
  113.  
  114. WM_MBUTTONDOWN
  115. WM_RBUTTONDOWN
  116. WM_LBUTTONDBLCLK
  117. WM_MBUTTONDBLCLK
  118. WM_RBUTTONDBLCLK
  119.  
  120. it first sends these messages up to the parent. If the parent processes
  121. these messages, it should return a non-zero value to the editor control.
  122. If it returns 0 to the editor, then the editor will take its default
  123. action for these messages.
  124.  
  125. Example :
  126.  
  127.    In the parent's window procedure :
  128.  
  129.   case WM_RBUTTONDOWN :
  130.     PopupMyMenu(); /* Put up a popup menu */
  131.     return TRUE;   /* Yes, I processed it */
  132.  
  133.   case WM_MBUTTONDOWN   :
  134.   case WM_LBUTTONDBLCLK :
  135.   case WM_MBUTTONDBLCLK :
  136.   case WM_RBUTTONDBLCLK :
  137.     return FALSE;
  138.  
  139.  
  140. 8/25/94
  141. -------
  142.  
  143. Corrected bug in the EM_LINELENGTH message where the value in wParam
  144. (or lParam) was not compatible with the Windows edit control version.
  145. We now pass the character index of the line into either wParam or
  146. lParam.
  147.  
  148. Replacement classes for Borland's OWL 2.0 and Inmark's zApp released.
  149.  
  150. Implementation of owner-drawn lines (added)
  151. -----------------------------------
  152.  
  153. To test out owner-drawn controls, use the MEWIN demo which comes with the
  154. editor. If you start MEWIN with the -o argument, then it will make the edit
  155. buffer an owner-drawn buffer. (ie : win mewin -o foo.c). When you give the
  156. -o argument to MEWIN, it creates edit buffers with the style ES_OWNERDRAW |
  157. ES_HASSTRINGS. In this sample, MEWIN performs some syntax coloring. It
  158. searches for several reserved words in the C/C++ language and draws these
  159. words in a different color and with a bold-faced font. 
  160.  
  161. When a buffer is owner-drawn, several messages are sent to the parent of
  162. the edit control. 
  163.  
  164. The WM_MEASUREITEM message is sent to the parent window in order to allow
  165. your application to determine the height of a newly inserted line. See the
  166. Windows API documentation on the WM_MEASUREITEM message and the correspond-
  167. ing MEASUREITEMSTRUCT data structure. The only difference is that the con-
  168. stant ODT_EDIT is put into the CtlType field of the MEASUREITEMSTRUCT. 
  169.  
  170. If you process the WM_MEASUREITEM message, then you must do two things.
  171. First, you must put a valid value into the itemHeight field of the
  172. MEASUREITEMSTRUCT structure which is passed. Second, you must return the
  173. value TRUE from the parent's window procedure. If you return FALSE, then
  174. the edit control assigned the default height to the line (the default
  175. height is the height of the edit buffer's font). 
  176.  
  177. When a line is deleted from the edit control, a WM_DELETEITEM message is
  178. sent to the parent window. See the Windows API documentation on the
  179. WM_DELETEITEM message and the corresponding DELETEITEMSTRUCT data struc-
  180. ture. The only difference is that the constant ODT_EDIT is put into the
  181. CtlType field of the DELETEITEMSTRUCT. 
  182.  
  183. The most important message is the WM_DRAWITEM message. Again, please see
  184. the Windows API documentation on this message. There is one important point
  185. here which you must keep in mind. Instead of sending a DRAWITEMSTRUCT
  186. structure, the Magma Edit DLL sends a MEDRAWITEMSTRUCT structure. This new
  187. structure contains some addition fields in it which the DRAWITEMSTRUCT does
  188. not have. In particular, it contains the 'lpText' field, which points to
  189. the actual string which should be drawn. The definition of the
  190. MEDRAWITEMSTRUCT structure is contained in MAGMAED.H. 
  191.  
  192. If your application draws the line, it must return TRUE in response to the
  193. WM_DRAWITEM message. Otherwise, if you return FALSE, then the edit control
  194. draws the line on its own. 
  195.  
  196. To get a feel for how to proces the WM_DRAWITEM message, please see the
  197. file UIOWNDRW.C which comes with the MEWIN sample source code. 
  198.  
  199. There are several other messages which are associated with the Magma Edit
  200. control, and these messages let you query and set the various components of
  201. a line's owner-draw information. These messages are : 
  202.  
  203. ME_GETITEMDATA
  204.   Queries the item-data value of a line in the edit buffer. Each
  205.   line in an owner-drawn edit buffer can have a 4-byte value associated
  206.   with it. This value is passed in the 'itemData' field of the
  207.   MEASUREITEMSTRUCT, DELETEITEMSTRUCT, and MEDRAWITEMSTRUCT.
  208. Parameters
  209.   wParam is the 0-based line number. If lParam is not 0, then the
  210.     value in lParam is used as the line number.
  211.   lParam can be the 0-based line number.
  212. Returns
  213.   The application-defined 4-byte data value which is associated with a line.
  214.  
  215. ME_SETITEMDATA
  216.   Sets the item-data value of a line in the edit buffer. Each
  217.   line in an owner-drawn edit buffer can have a 4-byte value associated
  218.   with it. This value is passed in the 'itemData' field of the
  219.   MEASUREITEMSTRUCT, DELETEITEMSTRUCT, and MEDRAWITEMSTRUCT.
  220. Parameters
  221.   wParam is the 0-based line number.
  222.   lParam contains the 4-byte value which is associated with the line.
  223. Returns
  224.   TRUE if set, LB_ERR if not set.
  225.  
  226. ME_GETITEMHEIGHT
  227.   Queries the owner-drawn height of a line in the edit buffer.
  228. Parameters
  229.   wParam is the 0-based line number. If lParam is not 0, then the
  230.     value in lParam is used as the line number.
  231.   lParam can be the 0-based line number.
  232. Returns
  233.   The height of the line.
  234.  
  235. ME_SETITEMHEIGHT
  236.   Sets the owner-drawn height of a line in the edit buffer.
  237. Parameters
  238.   wParam is the 0-based line number.
  239.   lParam contains the pixel height of the line.
  240. Returns
  241.   TRUE if set, LB_ERR if not set.
  242.  
  243.  
  244. 9/2/94
  245. ------
  246. Added :
  247.  
  248. ME_QUERYNUMWORDS
  249.   Queries the number of words in the editor buffer.
  250. Parameters
  251.   wParam and lParam are not used.
  252. Returns
  253.   A double-word value which contains the number of words in the
  254.   editor buffer.
  255.  
  256. ME_TRIMTEXT
  257.   Manipulates the spaces within a string in a variety of ways.
  258. Parameters
  259.   wParam can be a combination of one or more of the following :
  260.     TRIM_LEADING_BLANKS
  261.       Removes leading spaces from the string.
  262.     TRIM_TRAILING_BLANKS
  263.       Removes trailing spaces from the string.
  264.     TRIM_COMPRESS_BLANKS
  265.       Compresses multiple spaces into a single space.
  266.   lParam can be a far pointer to a string. If lParam is NULL, then
  267.     the text of the current line in the editing buffer is used.
  268. Returns
  269.   Nothing.
  270.  
  271.  
  272. ME_CENTER
  273.   Centers a line of text. The 'Right Margin' value is used for the
  274.   right border.
  275. Parameters
  276.   wParam and lParam are not used.
  277. Returns
  278.   Nothing.
  279.  
  280. ME_REFORMAT
  281.   Reformats a paragraph so that it fits between the left and right
  282.   margins.
  283. Parameters
  284.   wParam and lParam are not used.
  285. Returns
  286.   Nothing.
  287.  
  288.  
  289. ME_REFORMATALL
  290.   Reformats a the entire document, one paragraph at a time, so that 
  291.   it fits between the left and right margins.
  292. Parameters
  293.   wParam and lParam are not used.
  294. Returns
  295.   Nothing.
  296.  
  297.  
  298. 9/12/94
  299. -------
  300. Revised EM_SETTABSTOPS processing.
  301.  
  302. If the values in the tab array are positive, they are interpreted as
  303. column values. For example,
  304.  
  305.   static int aiTabs[] = { 30, 55, 68, 74 };
  306.   SendMessage(hEdit, EM_SETTABSTOPS, 4, (LPARAM) (LPINT) aiTabs);
  307.  
  308. will set a tab stop at character columns 30, 55, 68 and 74. This
  309. is consistent with the way which most DOS text editors work.
  310.  
  311. If the values in the tab array are negative, then the values are
  312. considered to be pixel positions.
  313.  
  314. 9/16/94
  315. -------
  316.  
  317. "AutoReformat" added to options. Setting this to TRUE will tell the editor
  318. to automatically reformat text which has been cut up by a CUT operation.
  319.  
  320.